# -*- coding: utf-8 -*-
from .BaseHandler import BaseHandler
from utils.captcha.captcha import captcha


class Image(BaseHandler):
    def get(self, *args, **kwargs):
        codeid = self.get_argument('codeid')
        # pcodeid = self.get_argument('pcodeid')
        name, text, image = captcha.generate_captcha()
        self.set_header('Context-Type', 'image/jpg')
        self.write(image)
